//
//  BaseCollectionViewController.swift
//  iOSProject-XX
//
//  Created by LeeXu on 2020/7/16.
//


import UIKit
import DZNEmptyDataSet

class BaseCollectionViewController : BaseViewController {
     
    @IBOutlet var collectionView:UICollectionView?
    
    var layout:UICollectionViewLayout!
    
    convenience init(layout:UICollectionViewLayout) {
        self.init()
        self.layout = layout
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        if self.collectionView == nil  {
            if self.layout == nil {
                 fatalError("UICollectionViewLayout Not Null")
            }
            self.collectionView = UICollectionView(frame: .zero, collectionViewLayout: self.layout)
            self.collectionView?.backgroundColor = .white 
            self.collectionView?.showsVerticalScrollIndicator = false
            self.collectionView?.showsHorizontalScrollIndicator = false
            self.collectionView?.autoresizingMask = [.flexibleWidth,.flexibleHeight]
            self.view.addSubview(self.collectionView!)
            
        }
      
        
    }
}
 
